package com.duoduo.mcc;

import com.duoduo.mcc.service.MccCollectionService;
import com.duoduo.mcc.service.MccQueueService;
import com.duoduo.mcc.service.MccReceiveService;
import com.duoduo.mcc.thread.MccCreateThread;

public class MccMain {
	public static void main(String[] args) {
		MccCollectionService mccCollectionService = new MccCollectionService();
		MccQueueService mccQueueService = new MccQueueService(mccCollectionService);
		
		MccReceiveService mccReceiveService = new MccReceiveService(mccCollectionService, mccQueueService);
		Thread receive = new Thread(mccReceiveService);
		receive.start();
		
		MccCreateThread ct1 = new MccCreateThread(mccReceiveService, "1111111");
		Thread t1 = new Thread(ct1);
		t1.start();
		
		MccCreateThread ct3 = new MccCreateThread(mccReceiveService, "3333333");
		Thread t3 = new Thread(ct3);
		t3.start();
		
		MccCreateThread ct5 = new MccCreateThread(mccReceiveService, "5555555");
		Thread t5 = new Thread(ct5);
		t5.start();
	}
}
